-- DDL
CREATE EXTERNAL TABLE IF NOT EXISTS jms_dm.dm_outport_bagging_fine_sum_dt (
    site_code                 STRING COMMENT '站点CODE'
    , site_name               STRING COMMENT '站点名称'
    , site_type               STRING COMMENT '站点类型 1-总部,2-代理区,3-加盟商,4-中心,5-集散,6-网点'
    , sign_date               STRING COMMENT '签收日期'
    , agent_code              STRING COMMENT '站点所属代理区CODE'
    , agent_name              STRING COMMENT '站点所属代理区名称'
    , virt_code               STRING COMMENT '站点所属虚拟代理区CODE'
    , virt_name               STRING COMMENT '站点所属虚拟代理区名称'
    , should_bagging_cnt      BIGINT COMMENT '应建包票数'
    , actual_bagging_cnt      BIGINT COMMENT '实建包票数'
    , not_bagging_cnt         BIGINT COMMENT '未建包票数'
    , backfill_bagging_cnt    BIGINT COMMENT '补建包票数'
    , unbagging_operate_cnt   BIGINT COMMENT '未建包小件操作票数'
    , not_bagging_fine_amt         decimal(10,2) COMMENT '未建包罚款'
    , backfill_bagging_reward_amt  decimal(10,2) COMMENT '补建包奖励'
    , unbagging_operate_reward_amt decimal(10,2) COMMENT '未建包操作补贴'
) comment '出港建包奖罚汇总'
PARTITIONED BY (dt STRING)
STORED AS PARQUET
LOCATION '/dw/hive/jms_dm.db/external/dm_outport_bagging_fine_sum_dt'
;
